﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>我的桌面</title>
</head>
<body>
<div class="page-container" style="background-image: 'pig.jpg'">
	<p class="f-20 text-success">欢迎使用进入<span class="f-24">‘养殖场管理系统’</span>管理页面！</p>
	<p class="time"></p>
	<table class="table table-border table-bordered table-bg mt-20">
		<thead>
			<tr>
				<th colspan="2" scope="col">服务器信息</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>服务器IP地址</td>
				<td id="webIp"></td>
			</tr>
			<tr>
				<td>服务器协议</td>
				<td id="protocol"></td>
			</tr>
			<tr>
				<td>服务器端口 </td>
				<td id="port"></td>
			</tr>
			<tr>
				<td>服务器当前时间 </td>
				<td class="timeServer"></td>
			</tr>
		</tbody>
	</table>
	<table class="table table-border table-bordered table-bg mt-20">
		<thead>
			<tr>
				<th colspan="2" scope="col">客户端信息</th>
			</tr>
		</thead>
		<tbody>
			<!-- <tr>
				<td>客户端IP地址</td>
				<td id="clientIp"></td>
			</tr> -->
			<tr>
				<td>浏览器名称</td>
				<td id="serverName"></td>
			</tr>
			<tr>
				<td>浏览器版本号 </td>
				<td id="serverVersion"></td>
			</tr>
			<tr>
				<td>客户端操作系统 </td>
				<td id="system"></td>
			</tr>
			<tr>
				<td>客户端当前时间 </td>
				<td class="timeServer"></td>
			</tr>
		</tbody>
	</table>
</div>
<footer class="footer mt-20">
	<div class="container">
		<p>Copyright &copy;2016  养殖场管理系统 v1.0</p>
	</div>
</footer>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="static/h-ui/js/H-ui.js"></script> 
<script type="text/javascript">

    var setTime = setInterval(show,1000);

    function show(){
        //1. 创建时间对象
        var time = new Date();
        //2. 获取时间对象的属性
        var year = time.getFullYear();      //获取年份
        var month = time.getMonth() + 1;    //获取月份
        var day = time.getDate();           //获取天数
        var hour = time.getHours();     //获取小时
        var minute = time.getMinutes();     //获取分钟
        var second = getSec(time.getSeconds());     //获取秒数
        var week = getWeeks(time.getDay());       //获取星期

        var t = year + "-" + month + "-" + day +"  " + hour + ":" + minute + ":" + second + "  " + week;
        var t1 = year + "-" + month + "-" + day +"  " + hour + ":" + minute + ":" + second;

        $(".time").html("现在是:"+t);
        $(".timeServer").html(t1);
    }

    function getSec(seconds){
        if(seconds < 10){
            return "0" + seconds;
        }else{
            return seconds;
        }
    }

    function getWeeks(weeks){
        switch (weeks){
            case 0 :
                return "星期天";
                break;
            case 1 :
                return "星期一";
                break;
            case 2 :
                return "星期二";
                break;
            case 3 :
                return "星期三";
                break;
            case 4 :
                return "星期四";
                break;
            case 5 :
                return "星期五";
                break;
            case 6 :
                return "星期六";
                break;
        }
    }
    
    $("#webIp").html(document.location.hostname);
    $("#protocol").html(document.location.protocol);
    $("#port").html(document.location.port);
    $("#serverName").html(navigator.appName);
    $("#serverVersion").html(navigator.appVersion);
    $("#system").html(navigator.platform);
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F080836300300be57b7f34f4b3e97d911' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>